<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <head>
	 <base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title>校园招聘</title>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link href="css/content.css" rel="stylesheet">
		<link  href="css/footer.css" rel="stylesheet">
		<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
	</head>
  
  <body>
  <!-- 导入导航栏 -->
		<jsp:include page="/common/header.jsp"></jsp:include>
			<!-- 分割 -->
		<div style="height: 20px;"></div>
   <div class="container"  style="height:400px;">
	<div class="row">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>
							求职人id
						</th>
						<th>
							求职人姓名
						</th>
						<th>
							所投岗位
						</th>
						<th>
							状态
						</th>
						<th>
							感兴趣
						</th>
					</tr>
				</thead>
				<c:forEach items="${ lists}"  var="list">
					<tr>
						<td>
							<a href="show/showperson?id=${ list.pId}">${ list.pId}</a>
						</td>
						<td>
							天才不常有
						</td>
						<td>
							JAVA开发
						</td>
						
						<td>
							${ list.state==0?"未接受":已接受}
						</td>
						<c:if test="${list.state==0 }" var="flag" scope="session">
						<td>
							<input type="button" value="感兴趣" onclick="accept1(${list.id})">
						</td>
						</c:if>
					</tr>
				</c:forEach>
				
			</table>
		
		</script>	
		
	</div>
</div>
  <script type="text/javascript">
  	function accept1(a){
  			$.post("do/accept1", {id:a,state:1}, function(data){
       		   alert(data);
       		   location.reload(true);   
        	  });
           
           
  	
  	}
  
  
  
  </script>

<!-- 导入底部信息 -->
  	<jsp:include page="/common/footer.jsp"></jsp:include>

  </body>
</html>
